import QtQuick 2.2
import QtQuick.Controls 1.1
import QtQuick.Window 2.0

Rectangle{
    id: root;
    width: 240; height: 160
    color: "lightblue"
    MouseArea{
        width: parent.width
        height: parent.height
        onPressed: color="red"
        onReleased:  color="lightblue"
    }
}
